var WxParse = require('../../wxParse/wxParse.js');
var app = getApp();
Page({
  data: {
    curSlideIndex: 0,
  },
  onLoad: function (e) {
    var that = this;
    that.setData({
      id:e.id
    })
    that.requestOrder();
  },
  onShow: function () {
    app.setNavtitle('兑换详情');
    var that = this;
  },
  requestOrder: function () {
    var that = this;
    var orderid = that.data.id;
    //发起请求，获取列表列表
    wx.showLoading({
      title: '加载中',
    })
    wx.request({
      url: app.globalData.requestUrl,
      data: {
        map: 'applet_community_order_detail',
        tid: orderid
      },
      success: function (res) {
        if (res.data.ec == 200) {
          console.log(res.data.data);
          that.setData({
            orderDetail: res.data.data
          })
        } else {
          wx.showModal({
            title: '提示',
            content: res.data.em,
            showCancel: false
          });
        }
      },
      complete: function () {
        wx.hideLoading();
      }
    });
  },
})